import $http from 'axios'
import * as CONFIG from './config'
import Global from "../Global";

/**
 * @desc: This is Note
 * POST请求处理函数(POST),便于以后修改POST请求
 * @author: WJ
 * @date: 2018/10/18 19:07:03
 */
const $post = (paramSet) => {
  const userData = JSON.parse(sessionStorage.getItem("userData")) || null
  const mineSetFlag = userData.phone || null
  return $http.post(Global.host,{
    userPhone: mineSetFlag,
    phone: mineSetFlag,
    ...paramSet
  })
}

/**
 * @desc: This is Note
 * 产品大盘-产品型号top
 * @author: coulis
 * @date:
 */
export const salesTrend = (num) => $post({method:CONFIG.URL_CONFIG.SALES_TREND,num: num}).then(res => res.data)

/**
 * @desc: This is Note
 * 产品大盘-产品型号top
 * @author: coulis
 * @date:
 */
export const productTop = (num,sort) => {
  return $post({method:CONFIG.URL_CONFIG.PRODUCT_TOP,num:num,sort:sort}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 产品大盘-新品列表
 * @author: coulis
 * @date:
 */
export const newProductList = (num,sort) => {
  return $post({num:num,sort:sort,method:CONFIG.URL_CONFIG.NEW_PRODUCT}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 产品大盘-品类销售组合查询
 * @author: coulis
 * @date:
 */
export const getSaleCateGroup = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.SELECT_CATEGORY}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 品类销售-品类销售情况折线图
 * @author: coulis
 * @date:
 */
export const getCategoryLine = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.CATEGORY_LINE}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 品类销售参数特性列表
 * @author: coulis
 * @date:
 */
export const categorySpecificationList = (categoryId) => {
  return $post({categoryId:categoryId,method:CONFIG.URL_CONFIG.SPEC_LIST}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 品类销售-价格段饼图
 * @author: coulis
 * @date:
 */
export const priceSegment = (param) => {
  return $post({...param, method:CONFIG.URL_CONFIG.PRICE_SEGMENT}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 品类销售-规格类饼图
 * @author: coulis
 * @date:
 */
export const getSaleStandard = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.OTHER_SPEC}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 品类下各型号销售数据
 * @author: coulis
 * @date:
 */
export const getCategoryList = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.CATEGORY_LIST}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 产品列表销售详情-折线图
 * @author: coulis
 * @date:
 */
export const salesDetailTrend = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.SALES_DETAIL_TREND}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 销售详情-渠道下终端销售情况列表
 * @author: coulis
 * @date:
 */
export const channelTerminal = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.CHANNEL_TERMINAL}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 销售详情-渠道下销售趋势折线
 * @author: coulis
 * @date:
 */
export const channelSalesLine = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.CHANNEL_SALESLINE}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 销售详情-所有门店
 * @author: coulis
 * @date:
 */
export const getShopListSale = (param) => {
  return $post({...param ,method:CONFIG.URL_CONFIG.SHOP_LIST}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 销售详情-全国地区组合查询渠道门店
 * @author: coulis
 * @date:
 */
export const getChannelSelectGroup = (param) => {
  return $post({...param ,method:CONFIG.URL_CONFIG.CHANNEL_SELECT}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 品类销售-品类名称集合
 * @author: coulis
 * @date:
 */
export const getCategoryName = () => {
  return $post({ method:"getCategoryNameList" }).then(res => res.data)
}

/**
 * @desc: This is Note
 * 产品预警
 * @author: WJ
 * @date: 2018/09/29 13:15:56
 **/
export const singleProdWarnPost = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.SINGLE_PROD_WARN_POST}).then(res => res.data)
}
export const singleProdWarnGet = (param) => {
  return $post({method:CONFIG.URL_CONFIG.SINGLE_PRODWARN_GET,...param}).then(res => res.data)
}
export const singleProdWarnCodeOrName = (param) => {
  return $post({method:CONFIG.URL_CONFIG.SELECT_CODEORNAME,...param}).then(res => res.data)
}
export const getCategoryNameList = () => {
  return $post({method:CONFIG.URL_CONFIG.CATEGORY_NAME_LIST}).then(res => res.data)
}
export const getOrganizationTree = () => {
  return $post({method:CONFIG.URL_CONFIG.ORAGAINIZATION_TREE}).then(res => res.data)
}
export const getProductCodeList = (param) => {
  return $post({method:CONFIG.URL_CONFIG.PRODUCT_CODE_LIST,...param}).then(res => res.data)
}
export const getProductMonitorInfo = (param) => {
  return $post({method:CONFIG.URL_CONFIG.MINE_PROD_CONTROL,...param}).then(res => res.data)
}
export const getEmployeeSet = (param) => {
  return $post({method:CONFIG.URL_CONFIG.EMPLOYEESET_POST,...param}).then(res => res.data)
}
export const getMonitorByProdCode = (param) => {
  return $post({method:CONFIG.URL_CONFIG.PROD_CONTROL_SET_STATUS,...param}).then(res => res.data)
}
export const getaverageValueByProductCode = (param) => {
  return $post({method:CONFIG.URL_CONFIG.PROD_CONTROL_SAVE_INFO,...param}).then(res => res.data)
}
export const saveProductMonitorInfo = (param) => {
  return $post({method:CONFIG.URL_CONFIG.PROD_CONTROL_SAVE,...param}).then(res => res.data)
}
export const updateProductIndexStatus = (param) => {
  return $post({method:CONFIG.URL_CONFIG.UPDATE_PROD_INDEX_STATUS,...param}).then(res => res.data)
}
export const updateMonitorIndexState = (param) => {
  return $post({method:CONFIG.URL_CONFIG.UPDATE_PROD_MONITOR_STATUS,...param}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 评论详情
 * @author: WJ
 * @date: 2018/10/09 17:35:49
 **/
export const getCommentCount = (param) => {
  return $post({ ...param, method:CONFIG.URL_CONFIG.COMMENT_COUNT }).then(res => res.data)
}
export const getCommentCountMessage = (param) => {
  return $post({ ...param, method:CONFIG.URL_CONFIG.COMMENT_COUNT_MESSAGE }).then(res => res.data)
}
export const careRank = (param) => {
  return $post({ ...param, method:CONFIG.URL_CONFIG.CARE_RANK }).then(res => res.data)
}

/**
 * @desc: This is Note
 * 获取异常分析数据
 * @author: WJ
 * @date: 2018/10/08 15:16:59 (productCode) => $http.get(`${CONFIG.URL_CONFIG.CARE_RANK}?productCode=${productCode}`)
 **/
export const getStartAnalysis = (param) => {
  return $post({method:CONFIG.URL_CONFIG.OUTLITER_ANALYSIS,...param}).then(res => res.data)
}
export const getAnalysisCode = (param) => {
  return $post({method:CONFIG.URL_CONFIG.PROD_BRAND_LIST,...param}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 产品分析详情-页头统计数据
 * @author: coulis
 * @date:
 */
export const productNumber = () => {
  return $post({method:CONFIG.URL_CONFIG.PRODUCT_NUMBER}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 产品分析详情-条件查询
 * @author: coulis
 * @date:
 */
export const productAnalysis = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.PRODUCT_ANALYSIS}).then(res => res.data)
}
export const multiSelects = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.MULTI_SELECT}).then(res => res.data)
}
export const productMessage = () => {
  return $post({method:CONFIG.URL_CONFIG.PRODUCT_MESSAGE}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 产品分析详情-产品信息
 * @author: coulis
 * @date:
 */
export const productInfo = (productCode) => {
  return $post({productCode:productCode,method: CONFIG.URL_CONFIG.GET_COMP_PROD_GK}).then(res => res.data)
}
export const productParam = (productCode) => {
  return $post({productCode:productCode,method:CONFIG.URL_CONFIG.PRODUCT_PARAM}).then(res => res.data)
}
export const salePoint = (productCode) => {
  return $post({productCode:productCode,method:CONFIG.URL_CONFIG.SALE_POINT}).then(res => res.data)
}
export const saleWords = (productCode) => {
  return $post({productCode:productCode,method:CONFIG.URL_CONFIG.SALE_WORDS}).then(res => res.data)
}
export const saleState = (productCode) => {
  return $post({productCode:productCode,method:CONFIG.URL_CONFIG.SALESTATE}).then(res => res.data)
}
export const getProductTargetPopulation = (productCode) => {
  return $post({productCode:productCode,method:CONFIG.URL_CONFIG.TARGET_POPULATION}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 产品分析详情销售详情
 * @author: coulis
 * @date:
 */
export const getSaleCircle = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.SALE_DETAIL}).then(res => res.data)
}
export const priceTrend = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.PRICE_TREND}).then(res => res.data)
}
/**
* @desc: This is Note
* @author: coulis
 * 客流分析
* @date: 2018/11/28 17:33:39
*/
export const getShopFlow = (param) => $post({...param,method:CONFIG.URL_CONFIG.GET_SHOP_FLOW}).then(res => res.data)

/**
 * @desc: This is Note
 * 产品分析详情-用户分析
 * @author: coulis
 * @date:
 */
export const referenceRate = (param) => $post({...param,method:CONFIG.URL_CONFIG.REFERENCE_RATE}).then(res => res.data)
export const userBrandProduct = (param) => $post({...param,method:CONFIG.URL_CONFIG.USER_BRAND_PRODUCT}).then(res => res.data)
export const userCategoryProduct = (param) => $post({...param,method:CONFIG.URL_CONFIG.USER_CATEGORY_PRODUCT}).then(res => res.data)

/**
 * @desc: This is Note
 * 营销渠道大盘分析
 * @author: WJ
 * @date: 2018/10/14 15:40:31
 **/
export const getChannelCateSaleTrend = (num,channel) => {
  return $post({num:num,channel:channel,method:CONFIG.URL_CONFIG.CHANNEL_CATEGORY_SALES_TREND}).then(res => res.data)
}
export const getSaleCountAnalysisPost = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.CHANNEL_PENL_TOTAL}).then(res => res.data)
}
export const getCateSalesTrend = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.CHANNEL_CATE_SALE_TREND}).then(res => res.data)
}
export const getCateProdNextTrend = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.CHANNEL_CATE_SALE_TREND_ITEM}).then(res => res.data)
}
export const getChannelStaticInfo = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.CHANNEL_STATIC_INFO}).then(res => res.data)
}
export const getUnLineChannelSale = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.OFFLINE_CHANNELPENL_SALES}).then(res => res.data)
}
export const getSaleTotalMount = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.GET_SALE_TOTAL_MOUNT}).then(res => res.data)
}
export const getFlowCustom = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_FLOW_CUSTOM,...param}).then(res => res.data)
}
export const getChannelSetAll = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_ON_UN_CHANNEL,...param}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 营销渠道分析详情
 * @author: coulis
 * @date: 2018/10/19 10:33:13
 **/
export const getShopList = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.SHOP_CHANNEL}).then(res => res.data)
}
export const getShopCount = () => {
  return $post({method:CONFIG.URL_CONFIG.CHANNEL_COUNT}).then(res => res.data)
}
export const circleNum = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.CIRCLE_NUMBER}).then(res => res.data)
}
export const offineDetail = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.OFFLINE_DETAIL}).then(res => res.data)
}
export const offineDealer = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.OFFINE_DEALER}).then(res => res.data)
}
export const offineCategory = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.OFFINE_CATEGORY}).then(res => res.data)
}
export const offineCode = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.OFFINE_CODE}).then(res => res.data)
}
export const onlineCategory = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.ONLINE_CATEGORY}).then(res => res.data)
}
export const onlineCode = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.ONLINE_CODE}).then(res => res.data)
}
export const onlineShop = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.ONLINE_SHOP}).then(res => res.data)
}
export const onlineDetail = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.ONLINE_DETAIL}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 营销渠道-监控与跟踪
 * @author: WJ
 * @date: 2018/10/22 09:44:31
 */
export const getChannelDataByIndex = (param) => {
  let [ monitorBeginTime = null, monitorEndTime = null ] = param.controlValueTime || []
  return $post({ monitorBeginTime, monitorEndTime,...param,method:CONFIG.URL_CONFIG.CHANNEL_MONITOR_TRACK }).then(res => res.data)
}
export const getChannelRegion = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.REGIONS_AREA}).then(res => res.data)
}
export const getChannelProvince = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.PROVINCES_AREA}).then(res => res.data)
}
export const getChannelCity = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.CITYS_AREA}).then(res => res.data)
}
export const getShopChannelData = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.SHOP_CHANNEL_DATA}).then(res => res.data)
}
export const getChannelOnLineControl = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.CONTROL_ONLINE_SET}).then(res => res.data)
}
export const getshopMonitorData = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.SHOP_MONITOR_META}).then(res => res.data)
}
export const getMonitorbyShopNumber = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.CONTROL_CHANNEL_STATUS}).then(res => res.data)
}
export const updateMonitorIndex = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.CHANNEL_UPDATE_INDEX}).then(res => res.data)
}
export const getIndexAverageValue = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.CHANNEL_VALUE_AVEAGE}).then(res => res.data)
}
export const monitorSaveChannel = (param) => {
  return $post({...param,method:CONFIG.URL_CONFIG.CHANNEL_SAVE_MONITOR}).then(res => res.data)
}
export const monitorNumberChannel = (param) => {
  return $post({...param, method: CONFIG.URL_CONFIG.CHANNEL_NUMBER_META}).then(res => res.data)
}
export const monitorSearchParams = (param) => {
  return $post({method: CONFIG.URL_CONFIG.CHANNEL_CODE_NAME_SEARCH,...param}).then(res => res.data)
}
export const monitorUnLineSearchParams = (param) => {
  return $post({method: CONFIG.URL_CONFIG.CHANNEL_UNLINE_SEARCH,...param}).then(res => res.data)
}
export const monitorOnLineSearchParams = (param) => {
  return $post({method: CONFIG.URL_CONFIG.CHANNEL_ONLINE_SEARCH,...param}).then(res => res.data)
}

/**
* @desc: This is Note
 * 新品上市计划-整体节奏计划
* @author: coulis
* @date: 2018/11/14 19:17:24
*/
export const getRhymePlan = (param) => {
  return $post({method: CONFIG.URL_CONFIG.RHYTHM_PLAN,...param}).then(res => res.data)
}
export const getGantt = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GANTTCHART,...param}).then(res => res.data)
}
export const getStage = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GETSTAGE,...param}).then(res => res.data)
}
export const getKpi = (param) => {
  return $post({method: CONFIG.URL_CONFIG.KPILIST,...param}).then(res => res.data)
}
export const addRhyme = (param) => {
  return $post({method: CONFIG.URL_CONFIG.ADDRHTME,...param}).then(res => res.data)
}
export const setStage = (param) => {
  return $post({method: CONFIG.URL_CONFIG.SETSTAGE,...param}).then(res => res.data)
}
export const delRhyme = (param) => {
  return $post({method: CONFIG.URL_CONFIG.DELRHYME,...param}).then(res => res.data)
}
/**
 * @desc: This is Note
 * 新产品上市计划-整体部署规划
 * @author: WJ
 * @date: 2018/11/05 13:31:14
 **/
export const getCategoryListPlan = (param) => {
  return $post({method: CONFIG.URL_CONFIG.NEW_CATEGORY_LIST,...param}).then(res => res.data)
}
export const getProdCodeListPlan = (param) => {
  return $post({method: CONFIG.URL_CONFIG.NEW_PROD_CODE_LIST,...param}).then(res => res.data)
}
export const getProdResListPlan = (param) => {
  return $post({method: CONFIG.URL_CONFIG.PROD_PLAN_BY_CP,...param}).then(res => res.data)
}
export const getProdRhythmPlan = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_RHYTHM,...param}).then(res => res.data)
}
export const getProdSimple = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_SIMPLE_SALE,...param}).then(res => res.data)
}
export const getProdTrain = (param) => {
  return $post({method: CONFIG.URL_CONFIG.SEARCH_TRAIN,...param}).then(res => res.data)
}
export const getProdMaterial = (param) => {
  return $post({method: CONFIG.URL_CONFIG.SEARCH_MATERIALS,...param}).then(res => res.data)
}
export const getProdExtension = (param) => {
  return $post({method: CONFIG.URL_CONFIG.SEARCH_EXTENSION,...param}).then(res => res.data)
}
export const getProdAnalyse = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_DEPLOY_ANALYSIS,...param}).then(res => res.data)
}
export const getSaleBaseDetail = (param) => {
  return $post({method: CONFIG.URL_CONFIG.SALE_BASE_DETAIL,...param}).then(res => res.data)
}
export const getSaleBackDetail = (param) => {
  return $post({method: CONFIG.URL_CONFIG.SALE_BACK_DETAIL,...param}).then(res => res.data)
}
export const saleUserFeatureCount = (param) => {
  return $post({method: CONFIG.URL_CONFIG.SALE_USER_COUNT,...param}).then(res => res.data)
}
export const saveOrEditSale = (param) => {
  return $post({method: CONFIG.URL_CONFIG.EDIT_SALE_SUMMARY,...param}).then(res => res.data)
}
export const saveTrialSalePoint = (param) => {
  return $post({method: CONFIG.URL_CONFIG.SAVE_SALE_POINT,...param}).then(res => res.data)
}
export const getTrialSaleSummary = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_TRIAL_SUM,...param}).then(res => res.data)
}
export const saveTrialSaleSummary = (param) => {
  return $post({method: CONFIG.URL_CONFIG.SAVE_TRIAL_SUM,...param}).then(res => res.data)
}
export const deleteSalePointById = (param) => {
  return $post({method: CONFIG.URL_CONFIG.DELETE_SALE_POINT,...param}).then(res => res.data)
}
export const saveTSampleSend = (param) => {
  return $post({method: CONFIG.URL_CONFIG.SAVE_SIMPLE_SEND,...param}).then(res => res.data)
}
export const updateTExtension = (param) => {
  return $post({method: CONFIG.URL_CONFIG.UPDATE_EXTENSION,...param}).then(res => res.data)
}
export const updateProdPlanInfo = (param) => {
  return $post({method: CONFIG.URL_CONFIG.UPDATE_PROD_PLAN_INFO,...param}).then(res => res.data)
}
export const getEmpSaleAll = (param) => {
  return $post({method: CONFIG.URL_CONFIG.SALE_EMP_ALL,...param}).then(res => res.data)
}
export const delExtData = (param) => {
  return $post({method: CONFIG.URL_CONFIG.DEL_EXT_DATA,...param}).then(res => res.data)
}
export const getSampleCity = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_SIMPLE_CITY,...param}).then(res => res.data)
}
export const updateSimpleName = (param) => {
  return $post({method: CONFIG.URL_CONFIG.UPDATE_SIMPLE_NAME,...param}).then(res => res.data)
}
export const updateSendCity = (param) => {
  return $post({method: CONFIG.URL_CONFIG.UPDATE_SEND_CITY,...param}).then(res => res.data)
}
export const deleteSendCity = (param) => {
  return $post({method: CONFIG.URL_CONFIG.DEL_SEND_CITY,...param}).then(res => res.data)
}
export const deleteUrlSend = (param) => {
  return $post({method: CONFIG.URL_CONFIG.DEL_URL_SEND,...param}).then(res => res.data)
}
export const deleteMaterSend = (param) => {
  return $post({method: CONFIG.URL_CONFIG.DEL_MATER_INFO,...param}).then(res => res.data)
}
export const deleteSimpleSend = (param) => {
  return $post({method: CONFIG.URL_CONFIG.DEL_SIMPLE_SEND,...param}).then(res => res.data)
}
export const updateTrainSend = (param) => {
  return $post({method: CONFIG.URL_CONFIG.UPDATE_TRAIN_SEND,...param}).then(res => res.data)
}
export const deleteTrainSend = (param) => {
  return $post({method: CONFIG.URL_CONFIG.DEL_TRAIN_SEND,...param}).then(res => res.data)
}
export const deleteDeptSend = (param) => {
  return $post({method: CONFIG.URL_CONFIG.DEL_DEPT_TRAIN,...param}).then(res => res.data)
}
export const deleteDetailSend = (param) => {
  return $post({method: CONFIG.URL_CONFIG.DEL_DETAIL_TRAIN,...param}).then(res => res.data)
}
export const deleteCourseSend = (param) => {
  return $post({method: CONFIG.URL_CONFIG.DEL_COURSE_TRAIN,...param}).then(res => res.data)
}
export const getStageByProductId = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_STAGE_BY_ID,...param}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 产品阵列
 * @author: WJ
 * @date: 2018/11/18 13:51:36
 **/
export const getProdQuene = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_PROD_QUENE,...param}).then(res => res.data)
}

/**
* @desc: This is Note
* 产品档案管理
* @author: coulis
* @date: 2018/11/05 09:39:59
*/
export const  getPeopleArea= () => {
  return $post({method: CONFIG.URL_CONFIG.AREAPEOPLE}).then(res => res.data)
}
export const editTargetPeople = (param) => {
  return $post({method: CONFIG.URL_CONFIG.EDIT_TARGET_PEOPLE,...param}).then(res => res.data)
}
export const sellPointUpdate = (param) => {
  return $post({method: CONFIG.URL_CONFIG.SELL_POINT_UPDATE,...param}).then(res => res.data)
}

/**
* @desc: This is Note
 * 新品上市计划-时间轴
* @author: coulis
* @date: 2018/11/01 17:10:02
*/
export const timeTree = () => {
  return $post({method: CONFIG.URL_CONFIG.TIME_TREE}).then(res => res.data)
}

/**
* @desc: This is Note
 * 新品上市计划-活动数据上报
* @author: coulis
* @date: 2018/11/01 19:16:58
*/
export const dataUpdate = (param) => {
  return $post({method: CONFIG.URL_CONFIG.TESTSALEQUERY,...param}).then(res => res.data)
}
export const allCategoryTest = () => {
  return $post({method: CONFIG.URL_CONFIG.ALL_CATEGORY_SALE}).then(res => res.data)
}
export const procodeByCate = (param) => {
  return $post({method: CONFIG.URL_CONFIG.PROCODEBYCATE,...param}).then(res => res.data)
}
export const getSaleRegion = () => {
  return $post({method: CONFIG.URL_CONFIG.SALEREGION}).then(res => res.data)
}
export const getSaleProvince = (param) => {
  return $post({method: CONFIG.URL_CONFIG.SALEPROVINCE,...param}).then(res => res.data)
}
export const getSaleCity = (param) => {
  return $post({method: CONFIG.URL_CONFIG.SALECITY,...param}).then(res => res.data)
}
export const getSaleDetail = (param) => {
  return $post({method: CONFIG.URL_CONFIG.TEST_SALE_DETAIL,...param}).then(res => res.data)
}
export const issueFeedBack = (param) => {
  return $post({method: CONFIG.URL_CONFIG.ISSUE_FEED_BACK,...param}).then(res => res.data)
}
export const userFeatrue = (param) => {
  return $post({method: CONFIG.URL_CONFIG.USERFEATRUE,...param}).then(res => res.data)
}
export const getSummary = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GETSUMMARY,...param}).then(res => res.data)
}
export const editSummary = (param) => {
  return $post({method: CONFIG.URL_CONFIG.EDITSUMMARY,...param}).then(res => res.data)
}
export const currentImg = (param) => {
  return $post({method: CONFIG.URL_CONFIG.CURRENTIMG,...param}).then(res => res.data)
}
export const getCurrentImg = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GETCURRIMG,...param}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 渠道优化
 * @author: WJ
 * @date: 2018/11/20 11:04:13
 **/
export const getCateAll = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_ALL_CATEGORY,...param}).then(res => res.data)
}
export const getSaleTypePhoto = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_PHOTO_SALE,...param}).then(res => res.data)
}
export const getSaleTypeTop = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_SALE_TYPE,...param}).then(res => res.data)
}
export const getSaleTypeCount = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_COUNT_SALE,...param}).then(res => res.data)
}
export const getSaleUnlineSend = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_UNLINE_CHANNEL,...param}).then(res => res.data)
}
export const getSaleOnlineSend = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GRT_ONLINE_CHANNEL,...param}).then(res => res.data)
}
export const getDistrProductList = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_PROD_LIST,...param}).then(res => res.data)
}
export const getDistrBrandList = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_BRAND_LIST,...param}).then(res => res.data)
}
export const getUpShelveList = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_SHELVE_SALE,...param}).then(res => res.data)
}
export const getDistrShelveList = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_RIGHT_SHELVE,...param}).then(res => res.data)
}
export const getHeaderInfoNumber = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_HEADER_INFO,...param}).then(res => res.data)
}
export const updateUpShelve = (param) => {
  return $post({method: CONFIG.URL_CONFIG.UPDATE_SHELVE,...param}).then(res => res.data)
}
export const deleteUpShelve = (param) => {
  return $post({method: CONFIG.URL_CONFIG.DELETE_SHELVE,...param}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 渠道优化
 * @author: WJ
 * @date: 2018/12/24 15:41:31
 **/
export const createChannelSet = (param) => {
  return $post({method: CONFIG.URL_CONFIG.CREATE_CHANNEL,...param}).then(res => res.data)
}
export const updateChannelSet = (param) => {
  return $post({method: CONFIG.URL_CONFIG.UPDATE_CHANNEL,...param}).then(res => res.data)
}
export const getChannelDetail = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_CHANNEL_DETAIL,...param}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 营销计划
 * @author: WJ
 * @date: 2018/12/24 16:54:47
 **/
export const deleteDraftById = (param) => {
  return $post({method: CONFIG.URL_CONFIG.DEL_DRAFT_BY_ID,...param}).then(res => res.data)
}
export const getYearPlanDetail = (param) => {
  return $post({method: CONFIG.URL_CONFIG.DETAIL_YEAR_PALN_ALL,...param}).then(res => res.data)
}
export const getMonthPlan = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_MONTH_PLAN,...param}).then(res => res.data)
}
export const getMonthPlanAll = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_ALL_MONTH_PLAN,...param}).then(res => res.data)
}
export const getSaleMonthData = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_SALE_MONTH_DATA,...param}).then(res => res.data)
}
export const updateDraftByDraftId = (param) => {
  return $post({method: CONFIG.URL_CONFIG.UPDATE_DRAFT_BY_ID,...param}).then(res => res.data)
}
export const getProdBySelect = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_PROD_BY_SELECT,...param}).then(res => res.data)
}
export const detailPlanYear = (param) => {
  return $post({method: CONFIG.URL_CONFIG.DETAIL_PLAN_YEAR,...param}).then(res => res.data)
}
export const getFirstCateSet = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_FIRST_CATE_LIST,...param}).then(res => res.data)
}
export const getSecondCateSet = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_SECOND_CATE_LIST, ...param}).then(res => res.data)
}
export const getPlanHistoryDraft = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_PLAN_HISTORY_DRAFT_ID, ...param}).then(res => res.data)
}
export const createMonthDraft = (param) => {
  return $post({method: CONFIG.URL_CONFIG.CREATE_NEW_MONTH_DRAFT, ...param}).then(res => res.data)
}
export const getMonthPlanByYear = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_MONTH_PLAN_BY_YEAR, ...param}).then(res => res.data)
}
export const getDraftPlanByYear = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_DRAFT_PLAN_BY_YEAR, ...param}).then(res => res.data)
}
export const getDraftAllResult = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_DRAFT_ALL_RESULT, ...param}).then(res => res.data)
}
export const getDraftHistoryAllResult = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_DRAFT_HISTORY_ALL_RESULT, ...param}).then(res => res.data)
}
export const createYearDraft = (param) => {
  return $post({method: CONFIG.URL_CONFIG.CREATE_YEAR_DRAFT, ...param}).then(res => res.data)
}
export const saveToDraft = (param) => {
  return $post({method: CONFIG.URL_CONFIG.SAVE_TO_DRAFT, ...param}).then(res => res.data)
}
export const getPlanTimeYear = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_TIME_PLAN_YEAR, ...param}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 店铺管理
 * @author: WJ
 * @date: 2018/12/25 17:38:50
 **/
export const updateShopStatus = (param) => {
  return $post({method: CONFIG.URL_CONFIG.UPDATE_SHOP_STATUS, ...param}).then(res => res.data)
}
export const getShopInfoManage = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_SHOP_INFO_MANAGE, ...param}).then(res => res.data)
}
export const getAreaByParam = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_AREA_BY_PARAM, ...param}).then(res => res.data)
}
export const createShop = (param) => {
  return $post({method: CONFIG.URL_CONFIG.CREATE_SHOP, ...param}).then(res => res.data)
}
export const getInfoByOragin = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_INFO_ORGANIZATION, ...param}).then(res => res.data)
}
export const editShopInfo = (param) => {
  return $post({method: CONFIG.URL_CONFIG.EDIT_SHOP_INFO, ...param}).then(res => res.data)
}

/**
 * @desc: This is Note
 * 产品档案管理
 * @author: WJ
 * @date: 2018/12/26 10:02:51
 **/
export const getProdArchive = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_PROD_ARCHIVE, ...param}).then(res => res.data)
}
export const updateProdBasicState = (param) => {
  return $post({method: CONFIG.URL_CONFIG.UPDATE_PROD_BASE_STATE, ...param}).then(res => res.data)
}
export const updateSaleWord = (param) => {
  return $post({method: CONFIG.URL_CONFIG.UPDATE_SALE_WORD, ...param}).then(res => res.data)
}
export const updateSaleStatus = (param) => {
  return $post({method: CONFIG.URL_CONFIG.UPDATE_SALE_STATUS, ...param}).then(res => res.data)
}
export const getProdArchiveByCondition = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_PROD_ARCHIVE_BY_CONDITION, ...param}).then(res => res.data)
}
export const getCateProdList = (param) => {
  return $post({method: CONFIG.URL_CONFIG.GET_CATE_PROD_LIST, ...param}).then(res => res.data)
}


/**
 * @desc: This is Note
 * @author: WJ
 * @date: 2019/01/17 14:12:03
 **/
export const pushSendMessage = (param) => {
  return $post({method: CONFIG.URL_CONFIG.PUSH_SEND_MESSAGE, ...param}).then(res => res.data)
}


